import javax.swing.*;
import java.awt.*;

public class CSE470 {

    public static void main(String[] args) {

        JFrame frame = new JFrame("CSE470 Assignment02");
        Dimension dim = frame.getToolkit().getScreenSize();  
        int screenWidth = dim.width;  
        int screenHeight = dim.height;  
        int frameWidth = screenWidth/3;  
        int frameHeight = screenHeight/3;  
        frame.setSize(frameWidth,frameHeight);  
        frame.setLocation((screenWidth-frameWidth)/2,(screenHeight-frameHeight)/2); 

        JPanel panel = new JPanel();
        JButton button1 = new JButton("Button 1");
        final JLabel label = new JLabel();
        frame.getContentPane().add(panel);
        panel.add(button1);               
        panel.add(label);
        
        JTextField textField=new JTextField("Put your text here");
        frame.setLayout(new GridLayout(2,1,1,3));
        frame.add(textField);
        
        
        frame.setVisible(true);
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);    
    }
}